---
title: Rules
description: How to integrate Ultracite with AI coding assistants through editor rules.
---

Ultracite provides seamless integration with AI coding assistants by automatically generating editor-specific rule files. These rules help guide AI coding assistants to write better, more consistent code that follows best practices.

The editor rules work alongside Biome's linting and formatting. While Biome handles code formatting and catches syntax errors, the editor rules guide AI coding assistants to write better code from the start, reducing the need for fixes later.

This dual approach ensures both automated code quality (through Biome) and intelligent code generation (through AI coding rules).

## Setup

### Automatic Setup

When you run `npx ultracite init`, you'll be prompted to select which editor rules you want to enable:

```bash
? Which editor rules do you want to enable (optional)?
  ◯ GitHub Copilot (VSCode)
  ◯ Cursor
  ◯ Windsurf
  # ... etcetera
```

This will create the relevant file in your project directory.

### Manual Setup

If you want to manually set things up, create the relevant file in your project directory (for example `.cursor/rules` for Cursor or `.rules` for Zed). Then, copy and paste [this content](https://github.com/haydenbleasel/ultracite/tree/main/.cursor/rules/ultracite.mdc) into the file.

## Supported Editors

| Editor          | Rule File Location                |
| --------------- | --------------------------------- |
| GitHub Copilot  | `.github/copilot-instructions.md` |
| Cursor          | `.cursor/rules/ultracite.mdc`     |
| Windsurf        | `.windsurf/rules/ultracite.md`    |
| Zed             | `.rules`                          |
| Claude Code     | `.claude/CLAUDE.md`               |
| OpenAI Codex    | `AGENTS.md`                       |
| Kiro IDE        | `.kiro/steering/ultracite.md`     |
| Cline           | `.clinerules`                     |
| AMP             | `AGENT.md`                        |
| Aider           | `ultracite.md`                    |
| Firebase Studio | `.idx/airules.md`                 |
| Open Hands      | `.openhands/microagents/repo.md`  |
| Gemini CLI      | `GEMINI.md`                       |
| Junie           | `.junie/guidelines.md`            |
| Augment Code    | `.augment/rules/ultracite.md`     |
| Kilo Code       | `.kilocode/rules/ultracite.md`    |
| Codename Goose  | `.goosehints`                     |
| Roo Code        | `.roo/rules/ultracite.md`         |
| Warp            | `WARP.md`                         |
| Droid           | `AGENTS.md`                       |

## Benefits

Using Ultracite editor rules provides several advantages:

- **Consistency**: All AI-generated code follows the same conventions
- **Quality**: Rules enforce best practices and prevent common mistakes
- **Accessibility**: Built-in accessibility guidelines ensure inclusive code
- **Performance**: Rules promote efficient patterns and avoid anti-patterns
- **Security**: Guidelines help prevent common security vulnerabilities

## Customization

While the default rules are comprehensive, you can customize them for your specific needs:

1. **Modify existing rules**: Edit the rule files directly
2. **Add project-specific rules**: Append additional guidelines
3. **Disable rules**: Remove or comment out rules that don't apply to your project
